package com.knowledge.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
        import com.knowledge.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.knowledge.business.mapper.TFolderMapper;
import com.knowledge.business.domain.TFolder;
import com.knowledge.business.service.ITFolderService;

/**
 * 文件夹Service业务层处理
 *
 * @author zhaoyk
 * @date 2025-10-09
 */
@Service
public class TFolderServiceImpl extends ServiceImpl<TFolderMapper,TFolder>  implements ITFolderService
{
    @Autowired
    private TFolderMapper tFolderMapper;

    /**
     * 查询文件夹
     *
     * @param id 文件夹主键
     * @return 文件夹
     */
    @Override
    public TFolder selectTFolderById(String id)
    {
        return tFolderMapper.selectTFolderById(id);
    }

    /**
     * 查询文件夹列表
     *
     * @param tFolder 文件夹
     * @return 文件夹
     */
    @Override
    public List<TFolder> selectTFolderList(TFolder tFolder)
    {
        return tFolderMapper.selectTFolderList(tFolder);
    }

    /**
     * 新增文件夹
     *
     * @param tFolder 文件夹
     * @return 结果
     */
    @Override
    public int insertTFolder(TFolder tFolder)
    {
                tFolder.setCreateTime(DateUtils.getNowDate());
            return tFolderMapper.insertTFolder(tFolder);
    }

    /**
     * 修改文件夹
     *
     * @param tFolder 文件夹
     * @return 结果
     */
    @Override
    public int updateTFolder(TFolder tFolder)
    {
                tFolder.setUpdateTime(DateUtils.getNowDate());
        return tFolderMapper.updateTFolder(tFolder);
    }

    /**
     * 批量删除文件夹
     *
     * @param ids 需要删除的文件夹主键
     * @return 结果
     */
    @Override
    public int deleteTFolderByIds(String[] ids)
    {
        return tFolderMapper.deleteTFolderByIds(ids);
    }

    /**
     * 删除文件夹信息
     *
     * @param id 文件夹主键
     * @return 结果
     */
    @Override
    public int deleteTFolderById(String id)
    {
        return tFolderMapper.deleteTFolderById(id);
    }
}
